* dispnew.c (init_display): Get display name from environment
authorJim Blandy <jimb@redhat.com>
Thu, 25 Mar 1993 02:54:23 +0000 (02:54 +0000)
committerJim Blandy <jimb@redhat.com>
Thu, 25 Mar 1993 02:54:23 +0000 (02:54 +0000)
properly on VMS as well as Unix.

src/dispnew.c

index c106c32980d280e699e7c48f35d1475dd461afc4..25eccf95967f4f1a09e9416528fe8e830d688690 100644 (file)
@@ -1994,7 +1994,15 @@ init_display ()
      with an error message if that doesn't work.  */
 
 #ifdef HAVE_X_WINDOWS
-  if (!inhibit_window_system && (display_arg || getenv ("DISPLAY")))
+  if (! display_arg)
+    {
+#ifdef VMS
+      display_arg = getenv ("DECW$DISPLAY");
+#else
+      display_arg = getenv ("DISPLAY");
+#endif
+
+  if (!inhibit_window_system && display_arg)
     {
       Vwindow_system = intern ("x");
 #ifdef HAVE_X11